From: Florian Müllner Date: Mon, 22 Oct 2012 15:39:19 +0000 (+0200) Subject: overview: Expose scroll-events X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~4682 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=c495ff8ad8a630be2c21e940f8eee6ff6aa00ae8;p=gnome-shell.git overview: Expose scroll-events Using the scroll wheel in the window picker should switch workspaces. As the picker doesn't have a visible boundary though, it makes sense to accept scroll-event for the entire overview area. Rather than making the overview's main actor public, expose scroll-events via a signal. https://bugzilla.gnome.org/show_bug.cgi?id=686639 --- diff --git a/js/ui/overview.js b/js/ui/overview.js index 755dfb4b2..13f348aeb 100644 --- a/js/ui/overview.js +++ b/js/ui/overview.js @@ -125,6 +125,7 @@ const Overview = new Lang.Class({ this._overview._delegate = this; this._group = new St.BoxLayout({ name: 'overview-group', + reactive: true, clip_to_allocation: true }); this._backgroundGroup = new Meta.BackgroundGroup(); @@ -164,6 +165,7 @@ const Overview = new Lang.Class({ Main.xdndHandler.connect('drag-end', Lang.bind(this, this._onDragEnd)); global.screen.connect('restacked', Lang.bind(this, this._onRestacked)); + this._group.connect('scroll-event', Lang.bind(this, this._onScrollEvent)); this._windowSwitchTimeoutId = 0; this._windowSwitchTimestamp = 0; @@ -379,6 +381,10 @@ const Overview = new Lang.Class({ return DND.DragMotionResult.CONTINUE; }, + _onScrollEvent: function(actor, event) { + this.emit('scroll-event', event); + }, + addAction: function(action) { if (this.isDummy) return;